package tw.com.msig.b2c.car.setting.service.impl;

import java.util.List;

import tw.com.msig.b2c.car.setting.dao.SysparamDao;
import tw.com.msig.b2c.car.setting.service.SysparamService;
import tw.com.msig.b2c.car.setting.vo.CityVo;
import tw.com.msig.b2c.car.setting.vo.SysparamVo;

public class SysparamServiceImpl implements SysparamService
{
    private SysparamDao sysDao;
    
    public SysparamDao getSysDao()
	{
		return sysDao;
	}

	public void setSysDao(SysparamDao sysDao)
	{
		this.sysDao = sysDao;
	}

	@Override
	public List<SysparamVo> getAll()
	{
		// TODO Auto-generated method stub
		return sysDao.findAll();
	}
	@Override
	public SysparamVo getById(long id) {
		return sysDao.findById(id);
	}
	@Override
	public void update(SysparamVo sysparamVo) {
		SysparamVo dbVo = sysDao.findById(sysparamVo.getId());
		dbVo.setModifier(sysparamVo.getModifier());
		dbVo.setModifyTime(sysparamVo.getModifyTime());
		dbVo.setDesc(sysparamVo.getDesc());
		dbVo.setValue(sysparamVo.getValue());
		sysDao.update(dbVo);		
	}


}
